#include "addmiddlegroupdialog.h"
#include "ui_addmiddlegroupdialog.h"

addMiddleGroupDialog::addMiddleGroupDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::addMiddleGroupDialog)
{
    ui->setupUi(this);
    
    ui->lineEdit->setText("新建中间组");
    connect(ui->cancelBtn, SIGNAL(clicked(bool)), this, SLOT(close()));
}

addMiddleGroupDialog::~addMiddleGroupDialog()
{
    delete ui;
}

void addMiddleGroupDialog::on_OKBtn_clicked()
{
    if(!ui->lineEdit->text().isEmpty())
        this->middleGroupName = ui->lineEdit->text();    
    this->middleGroupBeginValue = ui->beginSpinBox->value();
    this->middleGroupNum = ui->countSpinBox->value();
    this->accept();
}
